#!/usr/bin/perl -w

use strict;

local $, = ' ';

my $dim1 = (shift or 10);
my $dim2 = (shift or 10);

print "$dim1\n$dim2\n";

for my $i (1..$dim1) {
   print map { int(rand(10)) } (1..$dim2);
   print "\n" ;
}
